/*
 * Copyright (c) 2021
 * User:mallplus多商户商城
 * File:IOmsOrderService.java
 * Date:2021/01/12 19:29:12
 */

package com.qyine.rlmall.service.impl;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qyine.rlmall.oms.entity.OmsOrder;
import com.qyine.rlmall.oms.entity.OmsOrderReturnApply;
import com.qyine.rlmall.utils.CommonResult;

import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author zscat
 * @since 2019-04-17
 */
public interface IOmsOrderService extends IService<OmsOrder> {



    /**
     * 自动取消超时订单
     */
    @Transactional
    CommonResult cancelTimeOutOrder();



    /**
     * 释放库存和销量
     *
     * @param newE
     */
    void releaseStock(OmsOrder newE);





    /**
     * 订单到期自动发货
     *
     * @return
     */
    CommonResult autoDeliveryOrder();

    /**
     * 订单到期自动评论
     *
     * @return
     */
    CommonResult autoCommentOrder();

    /**
     * 订单到期自动完成
     *
     * @return
     */
    CommonResult autoSucessOrder();






    /**
     *
     * @param orderReturnApply
     */
    void refund(OmsOrderReturnApply orderReturnApply) throws AlipayApiException;



}
